package cn.yingtian.image;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

public class DetailActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_detail);
		Intent intent = getIntent();
		Content con = (Content) intent.getSerializableExtra("content");
		TextView name = (TextView) findViewById(R.id.name);
		name.setText(con.getName());
		final ImageView img = (ImageView) findViewById(R.id.img);
		ImageLoader loader=	ImageLoader.newInstance();
		loader.loadImage(con.getUrl(), new ImageLoaderCallBack() {
			
			@Override
			public void imageLoaded(Uri uri, String imageUrl) {
				img.setImageURI(uri);
				
			}
		});
	}

}
